package com.sl.core.engine.datasource;

import org.anyline.adapter.EnvironmentWorker;
import org.anyline.log.Log;
import org.anyline.log.init.LogFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

@Component
public class ProcessAnylineLogFactory extends LogFactory {

    public static void reg(EnvironmentWorker start) {
        start.regBean("", new ProcessAnylineLogFactory());
    }


    @Override
    public Log get(Class<?> clazz) {
        Logger logger = LoggerFactory.getLogger(clazz);
        return new ProcessAnylineLog(logger);
    }

    @Override
    public Log get(String name) {
        Logger logger = LoggerFactory.getLogger(name);
        return new ProcessAnylineLog(logger);
    }

}
